main() {
  //1.for 循环
  for (int i = 0; i < 10; i++) {
    print(i);//0 1 2 3 4 5 6 7 8 9

  }


  //2.while 循环
  int i = 0;
  while (i < 10) {
    print(i);//0 1 2 3 4 5 6 7 8 9

    i++;
  }




  //3.do while 循环 先执行一次再判断
  int j = 0;
  do {
    print(j);//0 1 2 3 4 5 6 7 8 9

    j++;
  } while (j < 10);


//4.continue 跳过当前循环
  for (int i = 0; i < 10; i++) {
    if (i == 5) {
      continue; //跳过当前循环 继续下一次循环

    }
    print(i);//0 1 2 3 4 6 7 8 9

  }


  //5.break 跳出当前循环
  for (int i = 0; i < 10; i++) {
    if (i == 5) {
      break; //跳出循环

    }
  print(i);//0 1 2 3 4

  }
  
  //5.break 跳出当前循环
  for (int i = 0; i < 10; i++) {
    if (i == 5) {
      break; //跳出循环

    }
  print(i);//0 1 2 3 4

  }



}
